/******************************************************************************
 * Copyright (C) 2024 EternalChip, Inc.(Gmbh) or its affiliates.
 *
 * All Rights Reserved.
 *
 * @file
 *
 * @par dependencies
 * -
 * -
 * -
 *
 * @author
 *
 * @brief
 *
 * Processing flow:
 *
 * call directly.
 *
 * @version
 *
 *****************************************************************************/
#ifndef LOG_H
#define LOG_H

#include "usart.h"

#define BUF_SIZE 100

#define USE_UART_DEBUG 1

#if USE_UART_DEBUG > 0

#define MSG_LOG(Foramt, ...)   MyPrintf(&huart1, Foramt "\r\n", ##__VA_ARGS__)
#define MSG_ERROR(Foramt, ...) MyPrintf(&huart1, "ERROR: " Format "\r\n", ##__VA_ARGS__)

#else

#define MSG_LOG(Foramt, ...)
#define MSG_ERROR(Foramt, ...)

#endif

void MyPrintf(UART_HandleTypeDef *huart, const char *pFormat, ...);

#endif